<section class="content-header">
    <h1>景区路线搜索</h1>
</section>

<section class="content sm-content">
    <div class="box box-primary">
        <div class="box-header">
            <h3 class="box-title">查询条件</h3>
        </div>
        <div class="box-body form-horizontal order-form">
            <div class="form-group">
                <label class="col-sm-2 control-label">景区名称</label>
                <div class="col-sm-10">
                    <select class="form-control" ng-model="search_obj.region_id" ng-options="region.region_id as region.name for region in regions"></select>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-2">出发日期</label>
                <div class="input-group col-sm-10" style="padding-left: 15px;padding-right: 15px;">
                    <div class="input-group-addon" style="border-radius: 5px 0 0 5px!important;">
                        <i class="fa fa-calendar"></i>
                    </div>
                    <input id="time" type="text" class="form-control pull-right" style="border-radius: 0 5px 5px 0!important;" />
                </div>
            </div>
            <button type="button" class="btn btn-success pull-right" style="clear: both;font-weight: bold" ng-click="searchLines()">查 询</button>
        </div>
    </div>
</section>

<section class="content">
    <div class="box box-primary">
        <div class="box-header">
            <i class="ion ion-clipboard"></i>
            <h3 class="box-title">景区路线</h3>
            <div class="box-tools pull-right">
                <a class="btn btn-block btn-primary" href="#/linesCreat" target="_blank"><i class="fa fa-plus small-pr"></i>添加路线</a>
            </div>
        </div>
        <div class="box-body text-center" ng-show="lines.length == 0">未搜索到路线</div>
        <div class="box-body" ng-show="lines.length != 0" style="padding: 10px 0 0 0;">
            <table class="table table-striped text-center">
                <tbody>
                    <tr>
                        <th>景区ID</th>
                        <th>景区名称</th>
                        <th>出发时间</th>
                        <th>访客数</th>
                        <th>线路状态</th>
                        <!-- <th>创建时间</th> -->
                        <th>开启/关闭路线</th>
                    </tr>
                    <tr ng-repeat="line in lines">
                        <td>{{line.region_id}}</td>
                        <td>{{line.region_desc}}</td>
                        <td>{{line.line_date}}</td>
                        <td>{{line.visitor_count}}</td>
                        <td>{{line.line_status}}</td>
                        <!-- <td>{{line.create_time}}</td> -->
                        <td>
                            <div class="onoffswitch labeled dutch">
                                <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch{{line.region_line_id}}" ng-checked="!line.is_closed" ng-click="lineSwitch(line)" />
                                <label class="onoffswitch-label" for="myonoffswitch{{line.region_line_id}}">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="overlay" ng-show="isLoading">
            <i class="fa fa-refresh fa-spin"></i>
        </div>
    </div>
</section>